import java.util.Scanner;
public class test {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int k = sc.nextInt();
        int[] a = new int[n];
        for (int i = 0; i < n; i++) {
            a[i] = sc.nextInt();
        }
        int count = 0, len = 0;
        for (int i = 0; i < n; i++) {
            for (int j = i; j < n; j++) {
                if (a[j] > k){
                    count++;
                }else {
                    count--;
                }
                if (count > 0){
                    len = Math.max(len, j - i + 1);
                }
            }
        }
        System.out.println(len);
    }
}
